You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consensus-entrypoint now only runs public IP discovery when BASE_NODE_P2P_ADVERTISE_IP is not already set. If the operator provided a value, the script logs it and uses it as-is. Behavior when the variable is unset is unchanged: discovery runs against the same four providers and a total failure still exits with code 8.
Why?
As reported in #1107, the script unconditionally called get_public_ip and then export BASE_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP, which
silently overwrote any advertise IP the operator configured (NAT/proxy setups where the routable IP differs from the egress IP), and
made startup hard-fail with exit 8 on hosts with restricted egress to the four IP-echo services, even when the operator had already supplied the value discovery was meant to provide.
How has it been tested?
bash -n syntax check.
Exercised the guard with a stubbed curl in all three scenarios:
variable pre-set + discovery unreachable → keeps the operator value and continues (previously exit 8),
variable unset + discovery reachable → fetches and exports the discovered IP as before,
variable unset + discovery unreachable → still exits 8, unchanged.
Nice fix — this directly addresses the two failure modes from #1107. Preserving the operator-supplied BASE_NODE_P2P_ADVERTISE_IP and skipping discovery in that case fixes the silent NAT/proxy override, while keeping the existing discovery + exit-8 behavior unchanged when the variable is unset. The three tested scenarios (pre-set + discovery down, unset + discovery up, unset + discovery down) cover exactly the cases that mattered. +1 to merging this — it makes startup more robust for operators with restricted outbound HTTP while preserving current behavior when the variable is not provided.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1107
What changed?
consensus-entrypointnow only runs public IP discovery whenBASE_NODE_P2P_ADVERTISE_IPis not already set. If the operator provided a value, the script logs it and uses it as-is. Behavior when the variable is unset is unchanged: discovery runs against the same four providers and a total failure still exits with code 8.Why?
As reported in #1107, the script unconditionally called
get_public_ipand thenexport BASE_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP, whichHow has it been tested?
bash -nsyntax check.curlin all three scenarios: